class CreateUserlinks < ActiveRecord::Migration
  def self.up
    create_table :userlinks do |t|
      t.column  :user_id,   :integer,   :null => false
      t.column  :url,       :string,      :null => false

    end

    execute  "alter table userlinks add constraint fk_userlinks_users 
             foreign key (user_id) references users(id)"
  end

  def self.down
    drop_table :userlinks
  end
end
